API Documentation
Public Member Functions | List of all members
nkWinUi::MenuBar Class Referenceabstract

A graphical menu bar, appended on top of windows. More...

Inheritance diagram for nkWinUi::MenuBar:
nkExport::Exportable

Public Member Functions

 MenuBar ()
 
virtual ~MenuBar ()
 
ComponentgetParentComponent () const
 
void setParentComponent (Component *parent)
 
virtual void addMenu (const char *label)=0
 
virtual void addMenuItem (const char *menuLabel, const char *itemLabel, int attachedIndex)=0
 
virtual void addSeparator (const char *menuLabel)=0
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable ()
 
virtual ~Exportable ()
 

Detailed Description

A graphical menu bar, appended on top of windows.

Constructor & Destructor Documentation

◆ MenuBar()

nkWinUi::MenuBar::MenuBar ( )

Constructor.

◆ ~MenuBar()

virtual nkWinUi::MenuBar::~MenuBar ( )
virtual

Destructor.

Member Function Documentation

◆ getParentComponent()

Component* nkWinUi::MenuBar::getParentComponent ( ) const
Returns
Component owning the menu bar.

◆ setParentComponent()

void nkWinUi::MenuBar::setParentComponent ( Component parent)

Sets the component owning the menu bar.

Parameters
parentThe parent component to set.

◆ addMenu()

virtual void nkWinUi::MenuBar::addMenu ( const char *  label)
pure virtual

Add a menu to the bar.

Parameters
labelThe menu label.

◆ addMenuItem()

virtual void nkWinUi::MenuBar::addMenuItem ( const char *  menuLabel,
const char *  itemLabel,
int  attachedIndex 
)
pure virtual

Add a menu item to a menu in the bar.

Parameters
menuLabelThe name of the menu that should receive the item. Will be created if non existent.
itemLabelThe label of the item to add.
attachedIndexThe index to identify the item. Will be used with callbacks.

◆ addSeparator()

virtual void nkWinUi::MenuBar::addSeparator ( const char *  menuLabel)
pure virtual

Adds a separator to a menu.

Parameters
menuLabelThe name ot the menu that should receive the separator.

◆ exportClassToTree()

virtual void nkWinUi::MenuBar::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Basic exporting capability.

Parameters
rootNodeThe root of the tree to export to.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkWinUi::MenuBar::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Basic importing capability.

Parameters
rootNodeThe root of the tree to import from.

Implements nkExport::Exportable.


The documentation for this class was generated from the following file: